package WrenchDb.DAL.Entities;
// Generated 8-dic-2013 14.59.34 by Hibernate Tools 3.2.1.GA


import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import org.hibernate.annotations.Generated;
import org.hibernate.annotations.GenerationTime;

/**
 * WdbSitemap generated by hbm2java
 */
@Entity
@Table(name="wdb_sitemap"
    ,schema="public"
)
public class WdbSitemap  implements java.io.Serializable {


     private long sitemapId;
     private WdbApplication wdbApplication;
     private WdbSitemap wdbSitemap;
     private String sitemapUrl;
     private String configData;
     private String sitemapName;
     private String sitemapLabel;
     private Set<WdbSitemap> wdbSitemaps = new HashSet<WdbSitemap>(0);

    public WdbSitemap() {
    }

	
    public WdbSitemap(long sitemapId, WdbApplication wdbApplication, String sitemapUrl) {
        this.sitemapId = sitemapId;
        this.wdbApplication = wdbApplication;
        this.sitemapUrl = sitemapUrl;
    }
    public WdbSitemap(long sitemapId, WdbApplication wdbApplication, WdbSitemap wdbSitemap, String sitemapUrl, String configData, String sitemapName, String sitemapLabel, Set<WdbSitemap> wdbSitemaps) {
       this.sitemapId = sitemapId;
       this.wdbApplication = wdbApplication;
       this.wdbSitemap = wdbSitemap;
       this.sitemapUrl = sitemapUrl;
       this.configData = configData;
       this.sitemapName = sitemapName;
       this.sitemapLabel = sitemapLabel;
       this.wdbSitemaps = wdbSitemaps;
    }
   
     @Id 
    @Generated(GenerationTime.INSERT)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name="sitemap_id", unique=true, nullable=false)
    public long getSitemapId() {
        return this.sitemapId;
    }
    
    public void setSitemapId(long sitemapId) {
        this.sitemapId = sitemapId;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="application_id", nullable=false)
    public WdbApplication getWdbApplication() {
        return this.wdbApplication;
    }
    
    public void setWdbApplication(WdbApplication wdbApplication) {
        this.wdbApplication = wdbApplication;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="parent_sitemap_id")
    public WdbSitemap getWdbSitemap() {
        return this.wdbSitemap;
    }
    
    public void setWdbSitemap(WdbSitemap wdbSitemap) {
        this.wdbSitemap = wdbSitemap;
    }
    
    @Column(name="sitemap_url", nullable=false, length=1000)
    public String getSitemapUrl() {
        return this.sitemapUrl;
    }
    
    public void setSitemapUrl(String sitemapUrl) {
        this.sitemapUrl = sitemapUrl;
    }
    
    @Column(name="config_data", length=2000)
    public String getConfigData() {
        return this.configData;
    }
    
    public void setConfigData(String configData) {
        this.configData = configData;
    }
    
    @Column(name="sitemap_name", length=234)
    public String getSitemapName() {
        return this.sitemapName;
    }
    
    public void setSitemapName(String sitemapName) {
        this.sitemapName = sitemapName;
    }
    
    @Column(name="sitemap_label", length=2000)
    public String getSitemapLabel() {
        return this.sitemapLabel;
    }
    
    public void setSitemapLabel(String sitemapLabel) {
        this.sitemapLabel = sitemapLabel;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="wdbSitemap")
    public Set<WdbSitemap> getWdbSitemaps() {
        return this.wdbSitemaps;
    }
    
    public void setWdbSitemaps(Set<WdbSitemap> wdbSitemaps) {
        this.wdbSitemaps = wdbSitemaps;
    }




}


